<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        div {
            /* 逻辑像素为375px, 但是在iphone6/7/8设备上可以覆盖了整个屏幕宽度 */
            width: 375px;  
            height: 375px;
            background-color: lightblue;
        }

    </style>
</head>
<body>
    <div></div>
    <script>
        // 通过JS查看屏幕设备像素比的方式
        console.log(window.devicePixelRatio)


    </script>
</body>
</html>